import Vue from 'vue';
const prefix = '/userProject/';

/**
 * 待审核函数库获取
 * request: {}
 */
export const getExamineFunctionLibrary = () => {
  return Vue.$http({
    url: prefix + 'getFunctionLibraryNeedPublish',
    method: 'get'
  });
};

/**
 * 审核通过（支持批量）
 * request: {
 *  "libraryName": [] // 函数库名
 * }
 */
export const LibraryGranted = (data) => {
  return Vue.$http({
    url: prefix + 'publishFunctionLibraryGranted',
    method: 'post',
    data: {
      libraryNames: data
    }
  });
};

/**
 * 审核不通过（支持批量）
 * request: {
 *  "libraryName": [] // 函数库名
 * }
 */
export const LibraryDenied = (data) => {
  return Vue.$http({
    url: prefix + 'publishFunctionLibraryDenied',
    method: 'post',
    data: {
      libraryNames: data
    }
  });
};
